import request from '@/config/axios'

export interface RequirementManagePlanConfVO {
  id: number
  materialType: string
  materialNumber: string
  materialName: string
  drawingNumber: string
  material: string
  specification: string
  unit: string
  baitingTotalWeight: number
  processTotalWeight: number
  internalWork: boolean
  outsidePurchase: boolean
  creatorName: string
  updaterName: string
}

// 查询订单管理-需求管理-需求计划配置列表
export const getRequirementManagePlanConfPage = async (params) => {
  return await request.get({ url: `/order/requirement-manage-plan-conf/page`, params })
}

// 查询订单管理-需求管理-需求计划配置详情
export const getRequirementManagePlanConf = async (id: number) => {
  return await request.get({ url: `/order/requirement-manage-plan-conf/get?id=` + id })
}

// 新增订单管理-需求管理-需求计划配置
export const createRequirementManagePlanConf = async (data: RequirementManagePlanConfVO) => {
  return await request.post({ url: `/order/requirement-manage-plan-conf/create`, data })
}

// 修改订单管理-需求管理-需求计划配置
export const updateRequirementManagePlanConf = async (data: RequirementManagePlanConfVO) => {
  return await request.put({ url: `/order/requirement-manage-plan-conf/update`, data })
}

// 删除订单管理-需求管理-需求计划配置
export const deleteRequirementManagePlanConf = async (id: number) => {
  return await request.delete({ url: `/order/requirement-manage-plan-conf/delete?id=` + id })
}

// 导出订单管理-需求管理-需求计划配置 Excel
export const exportRequirementManagePlanConf = async (params) => {
  return await request.download({ url: `/order/requirement-manage-plan-conf/export-excel`, params })
}
